home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / ICProgKit 1.3.sit / ICProgKit1.3 / APIs / ICCAPI.p < prev    next >
Text File  |  1996-07-14  |  28KB  |  607 lines

  1. unit ICCAPI;
  2.  
  3. (* ・・・Start Header・・・ *)
  4.  
  5. (* File:         ICCAPI.p (intf)
  6.  * Generated by: 1.0d4
  7.  * For:          IC 1.3
  8.  * On:           Sunday, 14 July 1996, 20:19:55
  9.  * 
  10.  * This file is part of the Internet Configuration system and
  11.  * is placed in the public domain for the benefit of all.
  12.  *)
  13.  
  14. (* ・・・End Header・・・ *)
  15.  
  16. interface
  17.  
  18.     uses
  19. {$ifc undefined THINK_Pascal}
  20.         Types, Files, QuickDraw, AppleTalk, Aliases, 
  21. {$endc}
  22.         Components, ICTypes, ICKeys;
  23.  
  24.     const
  25.         internetConfigurationComponentType = 'PREF';                (* the component type *)
  26.         internetConfigurationComponentSubType = 'ICAp';            (* the component subtype *)
  27.         internetConfigurationComponentInterfaceVersion0 = $00000000;
  28.         internetConfigurationComponentInterfaceVersion1 = $00010000;
  29.         internetConfigurationComponentInterfaceVersion2 = $00020000;
  30. (* current version number is version 2 *)
  31.         internetConfigurationComponentInterfaceVersion = internetConfigurationComponentInterfaceVersion2;
  32.  
  33. (* ・・・Start ICCAPI.p・・・ *)
  34.  
  35.   (* ***** Starting Up and Shutting Down ***** *)
  36.   
  37.   function ICCStart(var inst : ComponentInstance; creator : OSType) : ICError;
  38.     (* Call this at application initialisation. Set creator to your application
  39.      * creator to allow for future expansion of the IC system. Returns
  40.      * inst as a connection to the IC system.
  41.      *)
  42.   
  43.   function ICCStop(inst : ComponentInstance) : ICError;
  44.     (* It is illegal to call this routine inside a ICBegin/End pair.
  45.      * Call this at application initialisation, after which inst
  46.      * is no longer valid connection to IC.
  47.      *)
  48.   
  49.   (* ***** Specifying a Configuration ***** *)
  50.   
  51.   function ICCFindConfigFile(inst : ComponentInstance; count : integer; folders : ICDirSpecArrayPtr) : ICError;
  52.   {$ifc not GeneratingCFM}
  53.     inline $2F3C, 6, 2, $7000, $A82A;
  54.   {$endc}
  55.     (* It is illegal to call this routine inside a ICBegin/End pair.
  56.      * Call to configure this connection to IC.
  57.      * Set count as the number of valid elements in folders.
  58.      * Set folders to a pointer to the folders to search.
  59.      * Setting count to 0 and folders to nil is OK.
  60.      * Searches the specified folders and then the Preferences folder
  61.      * in a unspecified manner.
  62.      *)
  63.   
  64.   function ICCFindUserConfigFile(inst : ComponentInstance; var where : ICDirSpec) : ICError;
  65.   {$ifc not GeneratingCFM}
  66.     inline $2F3C, 4, 14, $7000, $A82A;
  67.   {$endc}
  68.     (* Requires IC 1.1.
  69.      * It is illegal to call this routine inside a ICBegin/End pair.
  70.      * Similar to ICFindConfigFile except that it only searches the folder
  71.      * specified in where.  If the input parameters are valid the routine
  72.      * will always successful configure the instance, creating an
  73.      * empty configuration if necessary
  74.      * For use with double-clickable preference files.
  75.      *)
  76.   
  77.   function ICCGeneralFindConfigFile(inst : ComponentInstance; search_prefs : Boolean; can_create : Boolean; count : integer; folders : ICDirSpecArrayPtr) : ICError;
  78.   {$ifc not GeneratingCFM}
  79.     inline $2F3C, 10, 30, $7000, $A82A;
  80.   {$endc}
  81.     (* Requires IC 1.2.
  82.      * It is illegal to call this routine inside a ICBegin/End pair.
  83.      * Call to configure this connection to IC.
  84.      * This routine acts as a more general replacement for
  85.      * ICFindConfigFile and ICFindUserConfigFile.
  86.      * Set search_prefs to true if you want it to search the preferences folder.
  87.      * Set can_create to true if you want it to be able to create a new config.
  88.      * Set count as the number of valid elements in folders.
  89.      * Set folders to a pointer to the folders to search.
  90.      * Setting count to 0 and folders to nil is OK.
  91.      * Searches the specified folders and then optionally the Preferences folder
  92.      * in a unspecified manner.
  93.      *)
  94.   
  95.   function ICCChooseConfig(inst : ComponentInstance) : ICError;
  96.   {$ifc not GeneratingCFM}
  97.     inline $2F3C, 0, 33, $7000, $A82A;
  98.   {$endc}
  99.     (* Requires IC 1.2.
  100.      * It is illegal to call this routine inside a ICBegin/End pair.
  101.      * Requests the user to choose a configuration, typically using some
  102.      * sort of modal dialog. If the user cancels the dialog the configuration
  103.      * state will be unaffected.
  104.      *)
  105.   
  106.   function ICCChooseNewConfig(inst : ComponentInstance) : ICError;
  107.   {$ifc not GeneratingCFM}
  108.     inline $2F3C, 0, 34, $7000, $A82A;
  109.   {$endc}
  110.     (* Requires IC 1.2.
  111.      * It is illegal to call this routine inside a ICBegin/End pair.
  112.      * Requests the user to create a new configuration, typically using some
  113.      * sort of modal dialog. If the user cancels the dialog the configuration
  114.      * state will be unaffected.
  115.      *)
  116.   
  117.   function ICCGetConfigName(inst : ComponentInstance; longname : Boolean; var name : Str255) : ICError;
  118.   {$ifc not GeneratingCFM}
  119.     inline $2F3C, 6, 35, $7000, $A82A;
  120.   {$endc}
  121.     (* Requires IC 1.2.
  122.      * You must specify a configuration before calling this routine.
  123.      * Returns a string that describes the current configuration at a user
  124.      * level. Set longname to true if you want a long name, up to 255
  125.      * characters, or false if you want a short name, typically about 32
  126.      * characters.
  127.      * The returned string is for user display only. If you rely on the
  128.      * exact format of it, you will conflict with any future IC
  129.      * implementation that doesn't use explicit preference files.
  130.      *)
  131.   
  132.   function ICCGetConfigReference(inst : ComponentInstance; ref : ICConfigRefHandle) : ICError;
  133.   {$ifc not GeneratingCFM}
  134.     inline $2F3C, 4, 31, $7000, $A82A;
  135.   {$endc}
  136.     (* Requires IC 1.2.
  137.      * You must specify a configuration before calling this routine.
  138.      * Returns a self-contained reference to the instance's current
  139.      * configuration.
  140.      * ref must be a valid non-nil handle and it will be resized to fit the
  141.      * resulting data.
  142.      *)
  143.   
  144.   function ICCSetConfigReference(inst : ComponentInstance; ref : ICConfigRefHandle; flags : longint) : ICError;
  145.   {$ifc not GeneratingCFM}
  146.     inline $2F3C, 8, 32, $7000, $A82A;
  147.   {$endc}
  148.     (* Requires IC 1.2.
  149.      * It is illegal to call this routine inside a ICBegin/End pair.
  150.      * Reconfigures the instance using a configuration reference that was
  151.      * got using ICGetConfigReference reference. Set the
  152.      * icNoUserInteraction_bit in flags if you require that this routine
  153.      * not present a modal dialog. Other flag bits are reserved and should
  154.      * be set to zero.
  155.      * ref must not be nil.
  156.      *)
  157.   
  158.   function ICCSpecifyConfigFile(inst : ComponentInstance; var config : FSSpec) : ICError;
  159.   {$ifc not GeneratingCFM}
  160.     inline $2F3C, 4, 3, $7000, $A82A;
  161.   {$endc}
  162.     (* It is illegal to call this routine inside a ICBegin/End pair.
  163.      * For use only by the IC application.
  164.      * If you call this routine yourself, you will conflict with any
  165.      * future IC implementation that doesn't use explicit preference files.
  166.      *)
  167.   
  168.   (* ***** Getting Information ***** *)
  169.   
  170.   function ICCGetSeed(inst : ComponentInstance; var seed : longint) : ICError;
  171.   {$ifc not GeneratingCFM}
  172.     inline $2F3C, 4, 4, $7000, $A82A;
  173.   {$endc}
  174.     (* You do not have to specify a configuration before calling this routine.
  175.      * You do not have to be inside an ICBegin/End pair to call this routine.
  176.      * Returns the current seed for the IC prefs database.
  177.      * This seed changes each time a non-volatile preference is changed.
  178.      * You can poll this to determine if any cached preferences change.
  179.      *)
  180.   
  181.   function ICCGetPerm(inst : ComponentInstance; var perm : ICPerm) : ICError;
  182.   {$ifc not GeneratingCFM}
  183.     inline $2F3C, 4, 13, $7000, $A82A;
  184.   {$endc}
  185.     (* You do not have to specify a configuration before calling this routine.
  186.      * Returns the access permissions currently associated with this instance.
  187.      * While applications normally know what permissions they have,
  188.      * this routine is designed for use by override components.
  189.      *)
  190.   
  191.   function ICCDefaultFileName(inst : ComponentInstance; var name : Str63) : ICError;
  192.   {$ifc not GeneratingCFM}
  193.     inline $2F3C, 4, 11, $7000, $A82A;
  194.   {$endc}
  195.     (* You do not have to specify a configuration before calling this routine.
  196.      * You do not have to be inside an ICBegin/End pair to call this routine.
  197.      * Returns the default file name for IC preference files.
  198.      * Applications should never need to call this routine.
  199.      * If you rely on information returned by this routine yourself,
  200.      * you may conflict with any future IC implementation that doesn't use
  201.      * explicit preference files.
  202.      * The component calls this routine to set up the default IC file name.
  203.      * This allows this operation to be intercepted by a component that has
  204.      * captured us. It currently gets it from the component resource file.
  205.      * The glue version is hardwired to "Internet Preferences".
  206.      *)
  207.   
  208.   (* ***** Reading and Writing Preferences ***** *)
  209.   
  210.   function ICCBegin(inst : ComponentInstance; perm : ICPerm) : ICError;
  211.   {$ifc not GeneratingCFM}
  212.     inline $2F3C, 2, 5, $7000, $A82A;
  213.   {$endc}
  214.     (* You must specify a configuration before calling this routine.
  215.      * It is illegal to call this routine inside a ICBegin/End pair.
  216.      * Starting reading or writing multiple preferences.
  217.      * A call to this must be balanced by a call to ICEnd.
  218.      * Do not call WaitNextEvent between these calls.
  219.      * The perm specifies whether you intend to read or read/write.
  220.      * Only one writer is allowed per instance.
  221.      * Note that this may open resource files that are not closed
  222.      * until you call ICEnd.
  223.      *)
  224.   
  225.   function ICCGetPref(inst : ComponentInstance; key : Str255; var attr : ICAttr; buf : Ptr; var size : longint) : ICError;
  226.   {$ifc not GeneratingCFM}
  227.     inline $2F3C, 16, 6, $7000, $A82A;
  228.   {$endc}
  229.     (* You must specify a configuration before calling this routine.
  230.      * If you are getting or setting multiple preferences, you should place
  231.      * these calls within an ICBegin/ICEnd pair.
  232.      * If you call this routine outside of such a pair, it implicitly
  233.      * calls ICBegin(inst, icReadOnlyPerm).
  234.      * Reads the preference specified by key from the IC database to the
  235.      * buffer pointed to by buf and size.
  236.      * key must not be the empty string.
  237.      * If buf is nil then no data is returned.
  238.      * size must be non-negative.
  239.      * attr and size are always set on return. On errors (except icTruncatedErr)
  240.      * attr is set to ICattr_no_change and size is set to 0.
  241.      * size is the actual size of the data.
  242.      * attr is set to the attributes associated with the preference.
  243.      * If this routine returns icTruncatedErr then the other returned
  244.      * values are valid except that only the first size bytes have been
  245.      * return. size is adjusted to reflect the true size of the preference.
  246.      * Returns icPrefNotFound if there is no preference for the key.
  247.      *)
  248.   
  249.   function ICCSetPref(inst : ComponentInstance; key : Str255; attr : ICAttr; buf : Ptr; size : longint) : ICError;
  250.   {$ifc not GeneratingCFM}
  251.     inline $2F3C, 16, 7, $7000, $A82A;
  252.   {$endc}
  253.     (* You must specify a configuration before calling this routine.
  254.      * If you are getting or setting multiple preferences, you should place
  255.      * these calls within an ICBegin/ICEnd pair.
  256.      * If you call this routine outside of such a pair, it implicitly
  257.      * calls ICBegin(inst, icReadWritePerm).
  258.      * Sets the preference specified by key from the IC database to the
  259.      * value pointed to by buf and size.
  260.      * key must not be the empty string.
  261.      * size must be non-negative. 
  262.      * If buf is nil then the preference value is not set and size is ignored.
  263.      * If buf is not nil then the preference value is set to the size
  264.      * bytes pointed to by buf.
  265.      * If attr is ICattr_no_change then the preference attributes are not set.
  266.      * Otherwise the preference attributes are set to attr.
  267.      * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm.
  268.      * Returns icPermErr if current attr is locked, new attr is locked and buf <> nil.
  269.      *)
  270.   
  271.   function ICCFindPrefHandle(inst : ComponentInstance; key : Str255; var attr : ICAttr; prefh : Handle) : ICError;
  272.   {$ifc not GeneratingCFM}
  273.     inline $2F3C, 12, 36, $7000, $A82A;
  274.   {$endc}
  275.     (* Requires IC 1.2.
  276.      * You must specify a configuration before calling this routine.
  277.      * If you are getting or setting multiple preferences, you should place
  278.      * these calls within an ICBegin/ICEnd pair.
  279.      * If you call this routine outside of such a pair, it implicitly
  280.      * calls ICBegin(inst, icReadWritePerm).
  281.      * This routine effectively replaces ICGetPrefHandle.
  282.      * Reads the preference specified by key from the IC database into
  283.      * a handle, prefh.
  284.      * key must not be the empty string.
  285.      * attr is set to the attributes associated with the preference.
  286.      * You must set prefh to a non-nil handle before calling this routine.
  287.      * If the preference does not exist, icPrefNotFoundErr is returned.
  288.      *)
  289.   
  290.   function ICCGetPrefHandle(inst : ComponentInstance; key : Str255; var attr : ICAttr; var prefh : Handle) : ICError;
  291.   {$ifc not GeneratingCFM}
  292.     inline $2F3C, 12, 26, $7000, $A82A;
  293.   {$endc}
  294.     (* Requires IC 1.1.
  295.      * You must specify a configuration before calling this routine.
  296.      * If you are getting or setting multiple preferences, you should place
  297.      * these calls within an ICBegin/ICEnd pair.
  298.      * If you call this routine outside of such a pair, it implicitly
  299.      * calls ICBegin(inst, icReadOnlyPerm).
  300.      * This routine is now obsolete. Use ICFindPrefHandle instead.
  301.      * Reads the preference specified by key from the IC database into
  302.      * a newly created handle, prefh.
  303.      * key must not be the empty string.
  304.      * attr is set to the attributes associated with the preference.
  305.      * The incoming value of prefh is ignored.
  306.      * A new handle is created in the current heap and returned in prefh.
  307.      * If the routine returns an error, prefh is set to nil.
  308.      * If the preference does not exist, no error is returned and prefh is set
  309.      * to an empty handle.
  310.      *)
  311.   
  312.   function ICCSetPrefHandle(inst : ComponentInstance; key : Str255; attr : ICAttr; prefh : Handle) : ICError;
  313.   {$ifc not GeneratingCFM}
  314.     inline $2F3C, 12, 27, $7000, $A82A;
  315.   {$endc}
  316.     (* Requires IC 1.1.
  317.      * You must specify a configuration before calling this routine.
  318.      * If you are getting or setting multiple preferences, you should place
  319.      * these calls within an ICBegin/ICEnd pair.
  320.      * If you call this routine outside of such a pair, it implicitly
  321.      * calls ICBegin(inst, icReadWritePerm).
  322.      * Sets the preference specified by key from the IC database to the
  323.      * value contained in prefh.
  324.      * key must not be the empty string.
  325.      * If prefh is nil then the preference value is not set.
  326.      * If buf is not nil then the preference value is set to the data
  327.      * contained in it.
  328.      * If attr is ICattr_no_change then the preference attributes are not set.
  329.      * Otherwise the preference attributes are set to attr.
  330.      * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm.
  331.      * Returns icPermErr if current attr is locked, new attr is locked and prefh <> nil.
  332.      *)
  333.   
  334.   function ICCCountPref(inst : ComponentInstance; var count : longint) : ICError;
  335.   {$ifc not GeneratingCFM}
  336.     inline $2F3C, 4, 8, $7000, $A82A;
  337.   {$endc}
  338.     (* You must specify a configuration before calling this routine.
  339.      * You must be inside an ICBegin/End pair to call this routine.
  340.      * Counts the total number of preferences.
  341.      * If the routine returns an error, count is set to 0.
  342.      *)
  343.   
  344.   function ICCGetIndPref(inst : ComponentInstance; n : longint; var key : Str255) : ICError;
  345.   {$ifc not GeneratingCFM}
  346.     inline $2F3C, 8, 9, $7000, $A82A;
  347.   {$endc}
  348.     (* You must specify a configuration before calling this routine.
  349.      * You must be inside an ICBegin/End pair to call this routine.
  350.      * Returns the key of the Nth preference.
  351.      * n must be positive.
  352.      * Returns icPrefNotFoundErr if n is greater than the total number of preferences.
  353.      * If the routine returns an error, key is undefined.
  354.      *)
  355.   
  356.   function ICCDeletePref(inst : ComponentInstance; key : Str255) : ICError;
  357.   {$ifc not GeneratingCFM}
  358.     inline $2F3C, 4, 12, $7000, $A82A;
  359.   {$endc}
  360.     (* You must specify a configuration before calling this routine.
  361.      * You must be inside an ICBegin/End pair to call this routine.
  362.      * Deletes the preference specified by key.
  363.      * key must not be the empty string.
  364.      * Returns icPrefNotFound if the preference specified by key is not present.
  365.      *)
  366.   
  367.   function ICCEnd(inst : ComponentInstance) : ICError;
  368.   {$ifc not GeneratingCFM}
  369.     inline $2F3C, 0, 10, $7000, $A82A;
  370.   {$endc}
  371.     (* You must specify a configuration before calling this routine.
  372.      * You must be inside an ICBegin/End pair to call this routine.
  373.      * Terminates a preference session, as started by ICBegin.
  374.      * You must have called ICBegin before calling this routine.
  375.      *)
  376.   
  377.   (* ***** User Interface Stuff ***** *)
  378.   
  379.   function ICCEditPreferences(inst : ComponentInstance; key : Str255) : ICError;
  380.   {$ifc not GeneratingCFM}
  381.     inline $2F3C, 4, 15, $7000, $A82A;
  382.   {$endc}
  383.     (* Requires IC 1.1.
  384.      * You must specify a configuration before calling this routine.
  385.      * You do not have to be inside an ICBegin/End pair to call this routine.
  386.      * Instructs IC to display the user interface associated with editing
  387.      * preferences and focusing on the preference specified by key.
  388.      * If key is the empty string then no preference should be focused upon.
  389.      * You must have specified a configuration before calling this routine.
  390.      * You do not need to call ICBegin before calling this routine.
  391.      * In the current implementation this launches the IC application
  392.      * (or brings it to the front) and displays the window containing
  393.      * the preference specified by key.
  394.      * It may have a radically different implementation in future
  395.      * IC systems.
  396.      *)
  397.   
  398.   (* ***** URL Handling ***** *)
  399.   
  400.   function ICCParseURL(inst : ComponentInstance; hint : Str255; data : Ptr; len : longint; var selStart : longint; var selEnd : longint; url : Handle) : ICError;
  401.   {$ifc not GeneratingCFM}
  402.     inline $2F3C, 24, 16, $7000, $A82A;
  403.   {$endc}
  404.     (* Requires IC 1.1.
  405.      * You must specify a configuration before calling this routine.
  406.      * You do not have to be inside an ICBegin/End pair to call this routine.
  407.      * Parses a URL out of the specified text and returns it in a canonical form
  408.      * in a handle.
  409.      * hint indicates the default scheme for URLs of the form "name@address".
  410.      * If hint is the empty string then URLs of that form are not allowed.
  411.      * data points to the start of the text. It must not be nil.
  412.      * len indicates the length of the text. It must be non-negative.
  413.      * selStart and selEnd should be passed in as the current selection of
  414.      * the text. This selection is given in the same manner as TextEdit,
  415.      * ie if selStart = selEnd then there is no selection only an insertion
  416.      * point. Also selStart イ selEnd and 0 イ selStart イ len and 0 イ selEnd イ len.
  417.      * selStart and selEnd are returned as the bounds of the URL. If the
  418.      * routine returns an error then these new boundaries may be
  419.      * invalid but they will be close.
  420.      * The incoming url handle must not be nil.  The resulting URL is normalised
  421.      * and copied into the url handle, which is resized to fit.
  422.      *)
  423.   
  424.   function ICCLaunchURL(inst : ComponentInstance; hint : Str255; data : Ptr; len : longint; var selStart : longint; var selEnd : longint) : ICError;
  425.   {$ifc not GeneratingCFM}
  426.     inline $2F3C, 20, 17, $7000, $A82A;
  427.   {$endc}
  428.     (* Requires IC 1.1.
  429.      * You must specify a configuration before calling this routine.
  430.      * You do not have to be inside an ICBegin/End pair to call this routine.
  431.      * Parses a URL out of the specified text and feeds it off to the
  432.      * appropriate helper.
  433.      * hint indicates the default scheme for URLs of the form "name@address".
  434.      * If hint is the empty string then URLs of that form are not allowed.
  435.      * data points to the start of the text. It must not be nil.
  436.      * len indicates the length of the text. It must be non-negative.
  437.      * selStart and selEnd should be passed in as the current selection of
  438.      * the text. This selection is given in the same manner as TextEdit,
  439.      * ie if selStart = selEnd then there is no selection only an insertion
  440.      * point. Also selStart イ selEnd and 0 イ selStart イ len and 0 イ selEnd イ len.
  441.      * selStart and selEnd are returned as the bounds of the URL. If the
  442.      * routine returns an error then these new boundaries may be
  443.      * invalid but they will be close.
  444.      * The URL is parsed out of the text and passed off to the appropriate
  445.      * helper using the GURL AppleEvent.
  446.      *)
  447.   
  448.   (* ***** Mappings Routines *****
  449.    * 
  450.    * Routines for interrogating mappings database.
  451.    * 
  452.    * ----- High Level Routines -----
  453.    *)
  454.   
  455.   function ICCMapFilename(inst : ComponentInstance; filename : Str255; var entry : ICMapEntry) : ICError;
  456.   {$ifc not GeneratingCFM}
  457.     inline $2F3C, 8, 24, $7000, $A82A;
  458.   {$endc}
  459.     (* Requires IC 1.1.
  460.      * You must specify a configuration before calling this routine.
  461.      * If you are getting or setting multiple preferences, you should place
  462.      * these calls within an ICBegin/ICEnd pair.
  463.      * If you call this routine outside of such a pair, it implicitly
  464.      * calls ICBegin(inst, icReadWritePerm).
  465.      * Takes the name of an incoming file and returns the most appropriate
  466.      * mappings database entry, based on its extension.
  467.      * filename must not be the empty string.
  468.      * Returns icPrefNotFoundErr if no suitable entry is found.
  469.      *)
  470.   
  471.   function ICCMapTypeCreator(inst : ComponentInstance; fType : OSType; fCreator : OSType; filename : Str255; var entry : ICMapEntry) : ICError;
  472.   {$ifc not GeneratingCFM}
  473.     inline $2F3C, 16, 25, $7000, $A82A;
  474.   {$endc}
  475.     (* Requires IC 1.1.
  476.      * You must specify a configuration before calling this routine.
  477.      * You must be inside an ICBegin/End pair to call this routine.
  478.      * Takes the type and creator (and optionally the name) of an outgoing
  479.      * file and returns the most appropriate mappings database entry.
  480.      * The filename may be either the name of the outgoing file or
  481.      * the empty string.
  482.      * Returns icPrefNotFoundErr if no suitable entry found.
  483.      *)
  484.   
  485.   (* ----- Mid Level Routines ----- *)
  486.   
  487.   function ICCMapEntriesFilename(inst : ComponentInstance; entries : Handle; filename : Str255; var entry : ICMapEntry) : ICError;
  488.   {$ifc not GeneratingCFM}
  489.     inline $2F3C, 12, 28, $7000, $A82A;
  490.   {$endc}
  491.     (* Requires IC 1.1.
  492.      * You must specify a configuration before calling this routine.
  493.      * You do not have to be inside an ICBegin/End pair to call this routine.
  494.      * Takes the name of an incoming file and returns the most appropriate
  495.      * mappings database entry, based on its extension.
  496.      * entries must be a handle to a valid IC mappings database preference.
  497.      * filename must not be the empty string.
  498.      * Returns icPrefNotFoundErr if no suitable entry is found.
  499.      *)
  500.   
  501.   function ICCMapEntriesTypeCreator(inst : ComponentInstance; entries : Handle; fType : OSType; fCreator : OSType; filename : Str255; var entry : ICMapEntry) : ICError;
  502.   {$ifc not GeneratingCFM}
  503.     inline $2F3C, 20, 29, $7000, $A82A;
  504.   {$endc}
  505.     (* Requires IC 1.1.
  506.      * You must specify a configuration before calling this routine.
  507.      * You do not have to be inside an ICBegin/End pair to call this routine.
  508.      * Takes the type and creator (and optionally the name) of an outgoing
  509.      * file and returns the most appropriate mappings database entry.
  510.      * entries must be a handle to a valid IC mappings database preference.
  511.      * The filename may be either the name of the outgoing file or
  512.      * the empty string.
  513.      * Returns icPrefNotFoundErr if no suitable entry found.
  514.      *)
  515.   
  516.   (* ----- Low Level Routines ----- *)
  517.   
  518.   function ICCCountMapEntries(inst : ComponentInstance; entries : Handle; var count : longint) : ICError;
  519.   {$ifc not GeneratingCFM}
  520.     inline $2F3C, 8, 18, $7000, $A82A;
  521.   {$endc}
  522.     (* Requires IC 1.1.
  523.      * You must specify a configuration before calling this routine.
  524.      * You do not have to be inside an ICBegin/End pair to call this routine.
  525.      * Counts the number of entries in the mappings database.
  526.      * entries must be a handle to a valid IC mappings database preference.
  527.      * count is set to the number of entries.
  528.      *)
  529.   
  530.   function ICCGetIndMapEntry(inst : ComponentInstance; entries : Handle; ndx : longint; var pos : longint; var entry : ICMapEntry) : ICError;
  531.   {$ifc not GeneratingCFM}
  532.     inline $2F3C, 16, 19, $7000, $A82A;
  533.   {$endc}
  534.     (* Requires IC 1.1.
  535.      * You must specify a configuration before calling this routine.
  536.      * You do not have to be inside an ICBegin/End pair to call this routine.
  537.      * Gets the ndx'th entry in the mappings database.
  538.      * entries must be a handle to a valid IC mappings database preference.
  539.      * ndx must be in the range from 1 to the number of entries in the database.
  540.      * The value of pos is ignored on input. pos is set to the position of
  541.      * the ndx'th entry in the database and is suitable for passing back
  542.      * into ICSetMapEntry.
  543.      * Does not return any user data associated with the entry.
  544.      *)
  545.   
  546.   function ICCGetMapEntry(inst : ComponentInstance; entries : Handle; pos : longint; var entry : ICMapEntry) : ICError;
  547.   {$ifc not GeneratingCFM}
  548.     inline $2F3C, 12, 20, $7000, $A82A;
  549.   {$endc}
  550.     (* Requires IC 1.1.
  551.      * You must specify a configuration before calling this routine.
  552.      * You do not have to be inside an ICBegin/End pair to call this routine.
  553.      * Returns the entry located at position pos in the mappings database.
  554.      * entries must be a handle to a valid IC mappings database preference.
  555.      * pos should be 0 to get the first entry. To get the subsequent entries, add
  556.      * entry.total_size to pos and iterate.
  557.      * Does not return any user data associated with the entry.
  558.      *)
  559.   
  560.   function ICCSetMapEntry(inst : ComponentInstance; entries : Handle; pos : longint; var entry : ICMapEntry) : ICError;
  561.   {$ifc not GeneratingCFM}
  562.     inline $2F3C, 12, 21, $7000, $A82A;
  563.   {$endc}
  564.     (* Requires IC 1.1.
  565.      * You must specify a configuration before calling this routine.
  566.      * You do not have to be inside an ICBegin/End pair to call this routine.
  567.      * Sets the entry located at position pos in the mappings database.
  568.      * entries must be a handle to a valid IC mappings database preference.
  569.      * pos should be either a value returned from ICGetIndMapEntry or a value
  570.      * calculated using ICGetMapEntry.
  571.      * entry is a var parameter purely for stack space reasons. It is not
  572.      * modified in any way.
  573.      * Any user data associated with the entry is unmodified.
  574.      *)
  575.   
  576.   function ICCDeleteMapEntry(inst : ComponentInstance; entries : Handle; pos : longint) : ICError;
  577.   {$ifc not GeneratingCFM}
  578.     inline $2F3C, 8, 22, $7000, $A82A;
  579.   {$endc}
  580.     (* Requires IC 1.1.
  581.      * You must specify a configuration before calling this routine.
  582.      * You do not have to be inside an ICBegin/End pair to call this routine.
  583.      * Deletes the mappings database entry at pos.
  584.      * entries must be a handle to a valid IC mappings database preference.
  585.      * pos should be either a value returned from ICGetIndMapEntry or a value
  586.      * calculated using ICGetMapEntry.
  587.      * Also deletes any user data associated with the entry.
  588.      *)
  589.   
  590.   function ICCAddMapEntry(inst : ComponentInstance; entries : Handle; var entry : ICMapEntry) : ICError;
  591.   {$ifc not GeneratingCFM}
  592.     inline $2F3C, 8, 23, $7000, $A82A;
  593.   {$endc}
  594.     (* Requires IC 1.1.
  595.      * You must specify a configuration before calling this routine.
  596.      * You do not have to be inside an ICBegin/End pair to call this routine.
  597.      * Adds an entry to the mappings database.
  598.      * entries must be a handle to a valid IC mappings database preference.
  599.      * The entry is added to the end of the entries database.
  600.      * No user data is added.
  601.      *)
  602.   
  603.  
  604. (* ・・・End ICCAPI.p・・・ *)
  605.  
  606. implementation
  607. end. (* ICCAPI *)